import { reactive, computed } from "@vue/reactivity";

const a = { a: 1 };
const b = { b: 2 };
const ra = reactive(a);
const rb = reactive(b);

const ca = computed(()=>{
    console.log("ca");
    return ra.a;
});

const cb = computed(()=>{
    console.log("cb");
    return rb.b;
});

const result = computed(() => {
    // 执行
    console.log("result");
    return ca.value + cb.value;
});

console.log(result.value);
ra.a = 2;
ra.a = 3;
console.log(result.value);
